**********************************************************************************************************************************************
**********************************************************************************************************************************************
*Replication code for "Determining the credibility of commitments in international climate policy" by
*D. Victor, M. Lumkowsky, A. Dannenberg (2022)
**********************************************************************************************************************************************
**********************************************************************************************************************************************

*Settings***********************************************************************

version 15.1
discard
global MY_PATH_IN	"" // Enter path where data set is saved. 
global LOG_FILE 	"" // Enter path to save log-file. 
global LOG  ${LOG_FILE}Main_Text_Analysis.log
capture log close
log using "${LOG}", text replace
set more off
clear


********************************************************************************
*Use prepared data set**********************************************************

use "${MY_PATH_IN}03_SI_DATA.dta" 

********************************************************************************
*Table S19**********************************************************************

bys home_country: egen d2_10_mean = mean(d2_10)
bys home_country: egen d1_10_mean = mean(d1_10)

bys home_country: gen counter = _n 
keep if counter == 1

gen lse_laws_2016_2020_2 = lse_laws_2016_2020 
replace lse_laws_2016_2020_2 = lse_laws_2016_2020_2 + 8 if EU_27 == 1 

gen lse_policy_2016_2020_2 = lse_policy_2016_2020 
replace lse_policy_2016_2020_2 = lse_policy_2016_2020_2 + 8 if EU_27 == 1 

pwcorr d2_10_mean cat_2021_pa ccpi_2020_nat_cp ccpi_2021_nat_cp lse_laws_2016_2020 lse_policy_2016_2020, obs

pwcorr d2_10_mean cat_2021_pa ccpi_2020_nat_cp ccpi_2021_nat_cp lse_laws_2016_2020_2 lse_policy_2016_2020_2 if home_country != "EU", obs

********************************************************************************
*Table S20**********************************************************************

replace PONT_NDC_REV  = 5.1 - 3.2 if home_country == "EU"
pwcorr d1_10_mean cat_2020_overall cat_2021_overall ccpi_2020_2030_target ccpi_2021_2030_target PONT_NDC_REV, obs

********************************************************************************
*Figure S2**********************************************************************

*Upper middle panel*************************************************************

sum cat_2021_pa if OECD_CAT == 1
sum cat_2021_pa if OECD_CAT == 3
sum cat_2021_pa if OECD_CAT == 2
sum cat_2021_pa if OECD_CAT == 4
sum cat_2021_pa if OECD_CAT == 5
sum cat_2021_pa if OECD_CAT == 6

*Upper right panel**************************************************************

sum ccpi_2020_nat_cp if OECD_CAT == 1
sum ccpi_2020_nat_cp if OECD_CAT == 3
sum ccpi_2020_nat_cp if OECD_CAT == 2
sum ccpi_2020_nat_cp if OECD_CAT == 4
sum ccpi_2020_nat_cp if OECD_CAT == 5
sum ccpi_2020_nat_cp if OECD_CAT == 6

*Lower left panel***************************************************************

sum ccpi_2021_nat_cp if OECD_CAT == 1
sum ccpi_2021_nat_cp if OECD_CAT == 3
sum ccpi_2021_nat_cp if OECD_CAT == 2
sum ccpi_2021_nat_cp if OECD_CAT == 4
sum ccpi_2021_nat_cp if OECD_CAT == 5
sum ccpi_2021_nat_cp if OECD_CAT == 6

*Lower middle panel*************************************************************

sum lse_laws_2016_2020 if OECD_CAT == 1
sum lse_laws_2016_2020 if OECD_CAT == 3
sum lse_laws_2016_2020 if OECD_CAT == 2
sum lse_laws_2016_2020 if OECD_CAT == 4
sum lse_laws_2016_2020 if OECD_CAT == 5
sum lse_laws_2016_2020 if OECD_CAT == 6

*Lower right panel**************************************************************

sum lse_policy_2016_2020 if OECD_CAT == 1
sum lse_policy_2016_2020 if OECD_CAT == 3
sum lse_policy_2016_2020 if OECD_CAT == 2
sum lse_policy_2016_2020 if OECD_CAT == 4
sum lse_policy_2016_2020 if OECD_CAT == 5
sum lse_policy_2016_2020 if OECD_CAT == 6

********************************************************************************
*Figure S3**********************************************************************

*Upper middle panel*************************************************************

sum cat_2020_overall if OECD_CAT == 1
sum cat_2020_overall if OECD_CAT == 3
sum cat_2020_overall if OECD_CAT == 2
sum cat_2020_overall if OECD_CAT == 4
sum cat_2020_overall if OECD_CAT == 5
sum cat_2020_overall if OECD_CAT == 6

*Upper right panel**************************************************************

sum cat_2021_overall if OECD_CAT == 1
sum cat_2021_overall if OECD_CAT == 3
sum cat_2021_overall if OECD_CAT == 2
sum cat_2021_overall if OECD_CAT == 4
sum cat_2021_overall if OECD_CAT == 5
sum cat_2021_overall if OECD_CAT == 6

*Lower left panel***************************************************************

sum ccpi_2020_2030_target if OECD_CAT == 1
sum ccpi_2020_2030_target if OECD_CAT == 3
sum ccpi_2020_2030_target if OECD_CAT == 2
sum ccpi_2020_2030_target if OECD_CAT == 4
sum ccpi_2020_2030_target if OECD_CAT == 5
sum ccpi_2020_2030_target if OECD_CAT == 6

*Lower middle panel*************************************************************

sum ccpi_2021_2030_target if OECD_CAT == 1
sum ccpi_2021_2030_target if OECD_CAT == 3
sum ccpi_2021_2030_target if OECD_CAT == 2
sum ccpi_2021_2030_target if OECD_CAT == 4
sum ccpi_2021_2030_target if OECD_CAT == 5
sum ccpi_2021_2030_target if OECD_CAT == 6

*Lower right panel**************************************************************

sum PONT_NDC_REV if OECD_CAT == 1
sum PONT_NDC_REV if OECD_CAT == 3
sum PONT_NDC_REV if OECD_CAT == 2
sum PONT_NDC_REV if OECD_CAT == 4
sum PONT_NDC_REV if OECD_CAT == 5
sum PONT_NDC_REV if OECD_CAT == 6

********************************************************************************
*Figure S4**********************************************************************

*Upper middle panel*************************************************************

sum cat_2021_pa if home_country == "EU"
sum cat_2021_pa if home_country == "Australia"
sum cat_2021_pa if home_country == "USA"
sum cat_2021_pa if home_country == "China"
sum cat_2021_pa if home_country == "South Africa"
sum cat_2021_pa if home_country == "India"
sum cat_2021_pa if home_country == "Russia"
sum cat_2021_pa if home_country == "Saudi Arabia"
sum cat_2021_pa if home_country == "Brazil"

*Upper right panel**************************************************************

sum ccpi_2020_nat_cp if home_country == "EU"
sum ccpi_2020_nat_cp if home_country == "Australia"
sum ccpi_2020_nat_cp if home_country == "USA"
sum ccpi_2020_nat_cp if home_country == "China"
sum ccpi_2020_nat_cp if home_country == "South Africa"
sum ccpi_2020_nat_cp if home_country == "India"
sum ccpi_2020_nat_cp if home_country == "Russia"
sum ccpi_2020_nat_cp if home_country == "Saudi Arabia"
sum ccpi_2020_nat_cp if home_country == "Brazil"

*Lower left panel***************************************************************

sum ccpi_2021_nat_cp if home_country == "EU"
sum ccpi_2021_nat_cp if home_country == "Australia"
sum ccpi_2021_nat_cp if home_country == "USA"
sum ccpi_2021_nat_cp if home_country == "China"
sum ccpi_2021_nat_cp if home_country == "South Africa"
sum ccpi_2021_nat_cp if home_country == "India"
sum ccpi_2021_nat_cp if home_country == "Russia"
sum ccpi_2021_nat_cp if home_country == "Saudi Arabia"
sum ccpi_2021_nat_cp if home_country == "Brazil"

*Lower middle panel*************************************************************

sum lse_laws_2016_2020 if home_country == "EU"
sum lse_laws_2016_2020 if home_country == "Australia"
sum lse_laws_2016_2020 if home_country == "USA"
sum lse_laws_2016_2020 if home_country == "China"
sum lse_laws_2016_2020 if home_country == "South Africa"
sum lse_laws_2016_2020 if home_country == "India"
sum lse_laws_2016_2020 if home_country == "Russia"
sum lse_laws_2016_2020 if home_country == "Saudi Arabia"
sum lse_laws_2016_2020 if home_country == "Brazil"

*Lower right panel**************************************************************

sum lse_policy_2016_2020 if home_country == "EU"
sum lse_policy_2016_2020 if home_country == "Australia"
sum lse_policy_2016_2020 if home_country == "USA"
sum lse_policy_2016_2020 if home_country == "China"
sum lse_policy_2016_2020 if home_country == "South Africa"
sum lse_policy_2016_2020 if home_country == "India"
sum lse_policy_2016_2020 if home_country == "Russia"
sum lse_policy_2016_2020 if home_country == "Saudi Arabia"
sum lse_policy_2016_2020 if home_country == "Brazil"

********************************************************************************
*Figure S5**********************************************************************

*Upper middle panel*************************************************************

sum cat_2020_overall if home_country == "EU"
sum cat_2020_overall if home_country == "Australia"
sum cat_2020_overall if home_country == "USA"
sum cat_2020_overall if home_country == "China"
sum cat_2020_overall if home_country == "South Africa"
sum cat_2020_overall if home_country == "India"
sum cat_2020_overall if home_country == "Russia"
sum cat_2020_overall if home_country == "Saudi Arabia"
sum cat_2020_overall if home_country == "Brazil"

*Upper right panel**************************************************************

sum cat_2021_overall if home_country == "EU"
sum cat_2021_overall if home_country == "Australia"
sum cat_2021_overall if home_country == "USA"
sum cat_2021_overall if home_country == "China"
sum cat_2021_overall if home_country == "South Africa"
sum cat_2021_overall if home_country == "India"
sum cat_2021_overall if home_country == "Russia"
sum cat_2021_overall if home_country == "Saudi Arabia"
sum cat_2021_overall if home_country == "Brazil"

*Lower left panel***************************************************************

sum ccpi_2020_2030_target if home_country == "EU"
sum ccpi_2020_2030_target if home_country == "Australia"
sum ccpi_2020_2030_target if home_country == "USA"
sum ccpi_2020_2030_target if home_country == "China"
sum ccpi_2020_2030_target if home_country == "South Africa"
sum ccpi_2020_2030_target if home_country == "India"
sum ccpi_2020_2030_target if home_country == "Russia"
sum ccpi_2020_2030_target if home_country == "Saudi Arabia"
sum ccpi_2020_2030_target if home_country == "Brazil"

*Lower middle panel*************************************************************

sum ccpi_2021_2030_target if home_country == "EU"
sum ccpi_2021_2030_target if home_country == "Australia"
sum ccpi_2021_2030_target if home_country == "USA"
sum ccpi_2021_2030_target if home_country == "China"
sum ccpi_2021_2030_target if home_country == "South Africa"
sum ccpi_2021_2030_target if home_country == "India"
sum ccpi_2021_2030_target if home_country == "Russia"
sum ccpi_2021_2030_target if home_country == "Saudi Arabia"
sum ccpi_2021_2030_target if home_country == "Brazil"

*Lower right panel**************************************************************

sum PONT_NDC_REV if home_country == "EU"
sum PONT_NDC_REV if home_country == "Australia"
sum PONT_NDC_REV if home_country == "USA"
sum PONT_NDC_REV if home_country == "China"
sum PONT_NDC_REV if home_country == "South Africa"
sum PONT_NDC_REV if home_country == "India"
sum PONT_NDC_REV if home_country == "Russia"
sum PONT_NDC_REV if home_country == "Saudi Arabia"
sum PONT_NDC_REV if home_country == "Brazil"
********************************************************************************
********************************************************************************
